package com.zyc.studentstudy.ui.word

import android.annotation.SuppressLint
import android.content.Intent
import android.king.signature.PaintActivity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.zyc.studentstudy.databinding.FragmentWordBinding
import com.zyc.studentstudy.simple.SimpleFragment
import com.zyc.studentstudy.ui.youdao.FanyiFragment
import com.zyc.studentstudy.ui.youdao.YoudaoHolder

/**
 * Created by zhangyuncai on 2025/10/14.
 * 描述：
 */
class WordFragment : SimpleFragment() {

    private lateinit var mDB: FragmentWordBinding
    lateinit var mFanyiFragment: FanyiFragment

    override fun useDatabing(inflater: LayoutInflater, container: ViewGroup?): View? {
        mDB = FragmentWordBinding.inflate(inflater, container, false)
        return mDB.root
    }

    override fun lazyFetchData() {
    }

    override fun initView() {
    }

    @SuppressLint("RestrictedApi")
    override fun initEvent() {
        mDB.btWordInputfanyitext.setOnClickListener {
            YoudaoHolder.fanyiFragment.inputFanyiText()
        }
        mDB.btWordInputcidiantext.setOnClickListener {
            YoudaoHolder.cidianFragment.inputCidianText()
        }
        mDB.btWordClickcidianyuyin.setOnClickListener {
            YoudaoHolder.cidianFragment.clickCidianYuyin()
        }
        mDB.btWordStartpaint.setOnClickListener {
            mActivity.startActivity(Intent(mActivity, PaintActivity::class.java))
        }
    }

}